"use strict";
(self["webpackChunktoknow"] = self["webpackChunktoknow"] || []).push([[426],{

/***/ 1677:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {


// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "Z": () => (/* binding */ AuthorInfoCard)
});

// EXTERNAL MODULE: ./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
var runtime_core_esm_bundler = __webpack_require__(6252);
// EXTERNAL MODULE: ./node_modules/@vue/shared/dist/shared.esm-bundler.js
var shared_esm_bundler = __webpack_require__(3577);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/components/browse/AuthorInfoCard.vue?vue&type=template&id=a3318434&scoped=true


const _withScopeId = n => ((0,runtime_core_esm_bundler/* pushScopeId */.dD)("data-v-a3318434"),n=n(),(0,runtime_core_esm_bundler/* popScopeId */.Cn)(),n)
const _hoisted_1 = { class: "author-card-wrapper" }
const _hoisted_2 = ["src"]
const _hoisted_3 = { class: "author-base-intro" }
const _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("ul", { class: "util-list" }, [
  /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("li", null, [
    /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("i", { class: "iconfont icon-follow1" }),
    /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("span", null, "关注")
  ]),
  /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("li", null, [
    /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("i", { class: "iconfont icon-gengduo" }),
    /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("span", null, "更多作品")
  ])
], -1 /* HOISTED */))

function render(_ctx, _cache, $props, $setup, $data, $options) {
  return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("div", _hoisted_1, [
    (0,runtime_core_esm_bundler/* createElementVNode */._)("div", {
      class: "author-base-info",
      onClick: _cache[0] || (_cache[0] = (...args) => ($options.gotoAuthor && $options.gotoAuthor(...args)))
    }, [
      (0,runtime_core_esm_bundler/* createElementVNode */._)("img", {
        src: _ctx.$baseURL + $props.author.avatar,
        alt: "Author",
        class: "author-avatar"
      }, null, 8 /* PROPS */, _hoisted_2),
      (0,runtime_core_esm_bundler/* createElementVNode */._)("div", _hoisted_3, [
        (0,runtime_core_esm_bundler/* createElementVNode */._)("h2", null, (0,shared_esm_bundler/* toDisplayString */.zw)($props.author.username), 1 /* TEXT */),
        (0,runtime_core_esm_bundler/* createElementVNode */._)("h3", null, (0,shared_esm_bundler/* toDisplayString */.zw)($props.author.sign), 1 /* TEXT */)
      ])
    ]),
    (0,runtime_core_esm_bundler/* createElementVNode */._)("ul", {
      class: "author-data-info",
      onClick: _cache[1] || (_cache[1] = (...args) => ($options.gotoAuthor && $options.gotoAuthor(...args)))
    }, [
      ((0,runtime_core_esm_bundler/* openBlock */.wg)(true), (0,runtime_core_esm_bundler/* createElementBlock */.iD)(runtime_core_esm_bundler/* Fragment */.HY, null, (0,runtime_core_esm_bundler/* renderList */.Ko)($data.datas, (data, idx) => {
        return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("li", { key: idx }, [
          (0,runtime_core_esm_bundler/* createElementVNode */._)("h2", null, (0,shared_esm_bundler/* toDisplayString */.zw)($props.author[data.key]), 1 /* TEXT */),
          (0,runtime_core_esm_bundler/* createElementVNode */._)("h3", null, (0,shared_esm_bundler/* toDisplayString */.zw)(data.name), 1 /* TEXT */)
        ]))
      }), 128 /* KEYED_FRAGMENT */))
    ]),
    _hoisted_4
  ]))
}
;// CONCATENATED MODULE: ./src/pages/index/components/browse/AuthorInfoCard.vue?vue&type=template&id=a3318434&scoped=true

;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/components/browse/AuthorInfoCard.vue?vue&type=script&lang=js

  /* harmony default export */ const AuthorInfoCardvue_type_script_lang_js = ({
    props: {
      author: {
        type: Object,
        default: () => ({})
      },
    },
    data() {
      return {
        datas: [
          {
            name: '粉丝',
            key: 'follow_times'
          },
          {
            name: '文章',
            key: 'article_num'
          },
          {
            name: '获赞',
            key: 'like_times'
          },
          {
            name: '收藏',
            key: 'collect_times'
          }
        ]
      }
    },
    methods: {
      gotoAuthor() {
        this.$router.push({
          path: `/author/${this.author.user_id}/profile`
        })
      }
    },
  });

;// CONCATENATED MODULE: ./src/pages/index/components/browse/AuthorInfoCard.vue?vue&type=script&lang=js
 
// EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
var exportHelper = __webpack_require__(3744);
;// CONCATENATED MODULE: ./src/pages/index/components/browse/AuthorInfoCard.vue




;


const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.Z)(AuthorInfoCardvue_type_script_lang_js, [['render',render],['__scopeId',"data-v-a3318434"]])

/* harmony default export */ const AuthorInfoCard = (__exports__);

/***/ }),

/***/ 4552:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {


// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "Z": () => (/* binding */ CommentCard)
});

// EXTERNAL MODULE: ./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
var runtime_core_esm_bundler = __webpack_require__(6252);
// EXTERNAL MODULE: ./node_modules/@vue/shared/dist/shared.esm-bundler.js
var shared_esm_bundler = __webpack_require__(3577);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/components/browse/CommentCard.vue?vue&type=template&id=572be69c&scoped=true


const _withScopeId = n => ((0,runtime_core_esm_bundler/* pushScopeId */.dD)("data-v-572be69c"),n=n(),(0,runtime_core_esm_bundler/* popScopeId */.Cn)(),n)
const _hoisted_1 = { class: "comment-card-wrapper" }
const _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("h2", { class: "title" }, "评论", -1 /* HOISTED */))
const _hoisted_3 = { class: "write-comment clearfix" }
const _hoisted_4 = { class: "avatar-wrapper" }
const _hoisted_5 = ["src"]
const _hoisted_6 = { class: "submit-wrapper" }
const _hoisted_7 = { class: "comment-list" }
const _hoisted_8 = ["src", "onClick"]
const _hoisted_9 = { class: "comment-wrapper" }
const _hoisted_10 = { class: "comment-author-info" }
const _hoisted_11 = { class: "comment-content" }

function render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_text_area = (0,runtime_core_esm_bundler/* resolveComponent */.up)("text-area")

  return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("div", _hoisted_1, [
    _hoisted_2,
    (0,runtime_core_esm_bundler/* createElementVNode */._)("div", _hoisted_3, [
      (0,runtime_core_esm_bundler/* createElementVNode */._)("div", _hoisted_4, [
        (0,runtime_core_esm_bundler/* createElementVNode */._)("img", {
          src: _ctx.$baseURL + $options.userInfos.avatar,
          alt: "avatar"
        }, null, 8 /* PROPS */, _hoisted_5)
      ]),
      (0,runtime_core_esm_bundler/* createVNode */.Wm)(_component_text_area, {
        class: "comment-input",
        value: $data.commentContent,
        "onUpdate:value": _cache[0] || (_cache[0] = $event => (($data.commentContent) = $event))
      }, null, 8 /* PROPS */, ["value"])
    ]),
    (0,runtime_core_esm_bundler/* createElementVNode */._)("div", _hoisted_6, [
      (0,runtime_core_esm_bundler/* createElementVNode */._)("button", {
        class: "submit-comment",
        onClick: _cache[1] || (_cache[1] = (...args) => ($options.submitComment && $options.submitComment(...args)))
      }, "评论")
    ]),
    (0,runtime_core_esm_bundler/* createElementVNode */._)("ul", _hoisted_7, [
      ((0,runtime_core_esm_bundler/* openBlock */.wg)(true), (0,runtime_core_esm_bundler/* createElementBlock */.iD)(runtime_core_esm_bundler/* Fragment */.HY, null, (0,runtime_core_esm_bundler/* renderList */.Ko)($props.comments, (comment, idx) => {
        return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("li", { key: idx }, [
          (0,runtime_core_esm_bundler/* createElementVNode */._)("img", {
            src: _ctx.$baseURL + comment.avatar,
            alt: "Avatar",
            onClick: $event => ($options.routeToAuthor(comment.author_id))
          }, null, 8 /* PROPS */, _hoisted_8),
          (0,runtime_core_esm_bundler/* createElementVNode */._)("div", _hoisted_9, [
            (0,runtime_core_esm_bundler/* createElementVNode */._)("div", _hoisted_10, (0,shared_esm_bundler/* toDisplayString */.zw)(comment.author_name || "江户川哀"), 1 /* TEXT */),
            (0,runtime_core_esm_bundler/* createElementVNode */._)("p", _hoisted_11, (0,shared_esm_bundler/* toDisplayString */.zw)(comment.content), 1 /* TEXT */)
          ])
        ]))
      }), 128 /* KEYED_FRAGMENT */))
    ])
  ]))
}
;// CONCATENATED MODULE: ./src/pages/index/components/browse/CommentCard.vue?vue&type=template&id=572be69c&scoped=true

;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/components/utils/Input/TextArea.vue?vue&type=template&id=8551dff6&scoped=true


const TextAreavue_type_template_id_8551dff6_scoped_true_withScopeId = n => (_pushScopeId("data-v-8551dff6"),n=n(),_popScopeId(),n)
const TextAreavue_type_template_id_8551dff6_scoped_true_hoisted_1 = { class: "text-area-wrapper" }
const TextAreavue_type_template_id_8551dff6_scoped_true_hoisted_2 = ["value"]

function TextAreavue_type_template_id_8551dff6_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
  return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("div", TextAreavue_type_template_id_8551dff6_scoped_true_hoisted_1, [
    (0,runtime_core_esm_bundler/* createElementVNode */._)("textarea", {
      name: "abstract",
      value: $props.value,
      onInput: _cache[0] || (_cache[0] = $event => ($options.handleInput($event))),
      cols: "30",
      rows: "5"
    }, null, 40 /* PROPS, HYDRATE_EVENTS */, TextAreavue_type_template_id_8551dff6_scoped_true_hoisted_2)
  ]))
}
;// CONCATENATED MODULE: ./src/components/utils/Input/TextArea.vue?vue&type=template&id=8551dff6&scoped=true

;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/components/utils/Input/TextArea.vue?vue&type=script&lang=js

  /* harmony default export */ const TextAreavue_type_script_lang_js = ({
    props: {
      value: {
        type: String,
        default: () => ''
      },
    },
    emits: ['update:value'],
    methods: {
      handleInput(event) {
        this.$emit('update:value', event.target.value)
      }
    },
  });

;// CONCATENATED MODULE: ./src/components/utils/Input/TextArea.vue?vue&type=script&lang=js
 
// EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
var exportHelper = __webpack_require__(3744);
;// CONCATENATED MODULE: ./src/components/utils/Input/TextArea.vue




;


const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.Z)(TextAreavue_type_script_lang_js, [['render',TextAreavue_type_template_id_8551dff6_scoped_true_render],['__scopeId',"data-v-8551dff6"]])

/* harmony default export */ const TextArea = (__exports__);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/components/browse/CommentCard.vue?vue&type=script&lang=js



  /* harmony default export */ const CommentCardvue_type_script_lang_js = ({
    components: {
      TextArea: TextArea,
    },
    props: {
      comments: {
        type: Array,
        default: () => []
      },
    },
    data() {
      return {
        commentContent: ''
      }
    },
    computed: {
      userInfos() {
        return this.$store.state.user.infos;
      }
    },
    methods: {
      submitComment() {
        this.$emit('submitComment', this.commentContent);
      },
      routeToAuthor(author_id) {
        this.$router.push(`/author/${author_id}/profile`);
      }
    },
    mounted () {
    },
  });

;// CONCATENATED MODULE: ./src/pages/index/components/browse/CommentCard.vue?vue&type=script&lang=js
 
;// CONCATENATED MODULE: ./src/pages/index/components/browse/CommentCard.vue




;


const CommentCard_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(CommentCardvue_type_script_lang_js, [['render',render],['__scopeId',"data-v-572be69c"]])

/* harmony default export */ const CommentCard = (CommentCard_exports_);

/***/ }),

/***/ 2426:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "default": () => (/* binding */ ArticleView)
});

// EXTERNAL MODULE: ./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
var runtime_core_esm_bundler = __webpack_require__(6252);
// EXTERNAL MODULE: ./node_modules/@vue/shared/dist/shared.esm-bundler.js
var shared_esm_bundler = __webpack_require__(3577);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/views/ArticleView.vue?vue&type=template&id=4378ca8e&scoped=true


const _withScopeId = n => ((0,runtime_core_esm_bundler/* pushScopeId */.dD)("data-v-4378ca8e"),n=n(),(0,runtime_core_esm_bundler/* popScopeId */.Cn)(),n)
const _hoisted_1 = { class: "view-article-page-wrapper" }
const _hoisted_2 = { class: "relate-info-wrapper" }
const _hoisted_3 = { class: "article-wrapper" }
const _hoisted_4 = { class: "operation-list" }
const _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("p", { class: "iconfont icon-comment" }, null, -1 /* HOISTED */))
const _hoisted_6 = [
  _hoisted_5
]
const _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("li", null, [
  /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("p", { class: "iconfont icon-share" })
], -1 /* HOISTED */))

function render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_author_info_card = (0,runtime_core_esm_bundler/* resolveComponent */.up)("author-info-card")
  const _component_author_hot_article_card = (0,runtime_core_esm_bundler/* resolveComponent */.up)("author-hot-article-card")
  const _component_article_card = (0,runtime_core_esm_bundler/* resolveComponent */.up)("article-card")
  const _component_comment_card = (0,runtime_core_esm_bundler/* resolveComponent */.up)("comment-card")

  return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("div", _hoisted_1, [
    (0,runtime_core_esm_bundler/* createElementVNode */._)("div", _hoisted_2, [
      (0,runtime_core_esm_bundler/* createVNode */.Wm)(_component_author_info_card, {
        author: $data.author,
        class: "author-info-card"
      }, null, 8 /* PROPS */, ["author"]),
      (0,runtime_core_esm_bundler/* createVNode */.Wm)(_component_author_hot_article_card, {
        articles: $data.author.articles,
        class: "author-hot-article-card"
      }, null, 8 /* PROPS */, ["articles"])
    ]),
    (0,runtime_core_esm_bundler/* createElementVNode */._)("div", _hoisted_3, [
      (0,runtime_core_esm_bundler/* createVNode */.Wm)(_component_article_card, {
        article: $data.article,
        author: $data.author,
        class: "article-card"
      }, null, 8 /* PROPS */, ["article", "author"]),
      (0,runtime_core_esm_bundler/* createVNode */.Wm)(_component_comment_card, {
        comments: $data.comments,
        onSubmitComment: $options.comment,
        class: "comment-card"
      }, null, 8 /* PROPS */, ["comments", "onSubmitComment"])
    ]),
    (0,runtime_core_esm_bundler/* createElementVNode */._)("ul", _hoisted_4, [
      (0,runtime_core_esm_bundler/* createElementVNode */._)("li", {
        onClick: _cache[0] || (_cache[0] = (...args) => ($options.like && $options.like(...args)))
      }, [
        (0,runtime_core_esm_bundler/* createElementVNode */._)("p", {
          class: (0,shared_esm_bundler/* normalizeClass */.C_)(["iconfont icon-like", {
          been: $data.article.is_like
        }])
        }, null, 2 /* CLASS */)
      ]),
      (0,runtime_core_esm_bundler/* createElementVNode */._)("li", {
        onClick: _cache[1] || (_cache[1] = (...args) => ($options.collect && $options.collect(...args)))
      }, [
        (0,runtime_core_esm_bundler/* createElementVNode */._)("p", {
          class: (0,shared_esm_bundler/* normalizeClass */.C_)(["iconfont icon-collect", {
          been: $data.article.is_collect
        }])
        }, null, 2 /* CLASS */)
      ]),
      (0,runtime_core_esm_bundler/* createElementVNode */._)("li", {
        onClick: _cache[2] || (_cache[2] = (...args) => (_ctx.scrollToComment && _ctx.scrollToComment(...args)))
      }, _hoisted_6),
      _hoisted_7
    ])
  ]))
}
;// CONCATENATED MODULE: ./src/pages/index/views/ArticleView.vue?vue&type=template&id=4378ca8e&scoped=true

// EXTERNAL MODULE: ./src/utils/assert.js
var assert = __webpack_require__(4442);
// EXTERNAL MODULE: ./node_modules/vuex/dist/vuex.esm-bundler.js
var vuex_esm_bundler = __webpack_require__(894);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/components/article/ArticleCard.vue?vue&type=template&id=458f6c60&scoped=true


const ArticleCardvue_type_template_id_458f6c60_scoped_true_withScopeId = n => (_pushScopeId("data-v-458f6c60"),n=n(),_popScopeId(),n)
const ArticleCardvue_type_template_id_458f6c60_scoped_true_hoisted_1 = { class: "article-card-wrapper" }
const ArticleCardvue_type_template_id_458f6c60_scoped_true_hoisted_2 = { class: "title" }
const ArticleCardvue_type_template_id_458f6c60_scoped_true_hoisted_3 = { class: "article-base-info clearfix" }
const ArticleCardvue_type_template_id_458f6c60_scoped_true_hoisted_4 = ["src"]
const ArticleCardvue_type_template_id_458f6c60_scoped_true_hoisted_5 = { class: "info" }
const ArticleCardvue_type_template_id_458f6c60_scoped_true_hoisted_6 = ["src"]

function ArticleCardvue_type_template_id_458f6c60_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
  return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("div", ArticleCardvue_type_template_id_458f6c60_scoped_true_hoisted_1, [
    (0,runtime_core_esm_bundler/* createElementVNode */._)("div", ArticleCardvue_type_template_id_458f6c60_scoped_true_hoisted_2, (0,shared_esm_bundler/* toDisplayString */.zw)($props.article.title), 1 /* TEXT */),
    (0,runtime_core_esm_bundler/* createElementVNode */._)("div", ArticleCardvue_type_template_id_458f6c60_scoped_true_hoisted_3, [
      (0,runtime_core_esm_bundler/* createElementVNode */._)("img", {
        src: _ctx.$baseURL + $props.author.avatar,
        alt: "Auth"
      }, null, 8 /* PROPS */, ArticleCardvue_type_template_id_458f6c60_scoped_true_hoisted_4),
      (0,runtime_core_esm_bundler/* createElementVNode */._)("div", ArticleCardvue_type_template_id_458f6c60_scoped_true_hoisted_5, [
        (0,runtime_core_esm_bundler/* createElementVNode */._)("h2", null, (0,shared_esm_bundler/* toDisplayString */.zw)($props.author.username), 1 /* TEXT */),
        (0,runtime_core_esm_bundler/* createElementVNode */._)("h3", null, (0,shared_esm_bundler/* toDisplayString */.zw)(new Date($props.article.upload_date).toLocaleString()) + " - " + (0,shared_esm_bundler/* toDisplayString */.zw)($props.article.read_times), 1 /* TEXT */)
      ])
    ]),
    (0,runtime_core_esm_bundler/* createElementVNode */._)("iframe", {
      src: _ctx.$routeBaseURL + '/RTF/stage.html',
      frameborder: "0",
      ref: "RTF",
      class: "RTF"
    }, null, 8 /* PROPS */, ArticleCardvue_type_template_id_458f6c60_scoped_true_hoisted_6)
  ]))
}
;// CONCATENATED MODULE: ./src/pages/index/components/article/ArticleCard.vue?vue&type=template&id=458f6c60&scoped=true

;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/components/article/ArticleCard.vue?vue&type=script&lang=js

  /* harmony default export */ const ArticleCardvue_type_script_lang_js = ({
    props: {
      author: {
        type: Object,
        default: () => ({})
      },
      article: {
        type: Object,
        default: () => ({})
      },
    },
    data() {
      return {
        RTFState: 'loading',
      }
    },
    methods: {
      showArticle() {
        let RTFWindow = this.$refs.RTF.contentWindow;
        let func = () => {
          RTFWindow.postMessage(JSON.stringify({
            type: 'sendArticle',
            content: this.article.content
          }));
        };
        if(this.RTFState === 'loading') {
          RTFWindow.onload = func;
        } else {
          func();
        }
      }
    },
    watch: {
      article() {
        this.showArticle();
      }
    },
    mounted () {
      let RTFWindow = this.$refs.RTF.contentWindow;
      
      RTFWindow.onload = () => {
        this.RTFState = 'loaded';
      }

      window.addEventListener('message', event => {
        let data = event.data;

        if(data.type === 'changeRTFHeight') {
          console.log("ArticleCard", event);
          this.$refs.RTF.style.height = data.content + 'px';
        }
      })
    },
  });

;// CONCATENATED MODULE: ./src/pages/index/components/article/ArticleCard.vue?vue&type=script&lang=js
 
// EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
var exportHelper = __webpack_require__(3744);
;// CONCATENATED MODULE: ./src/pages/index/components/article/ArticleCard.vue




;


const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.Z)(ArticleCardvue_type_script_lang_js, [['render',ArticleCardvue_type_template_id_458f6c60_scoped_true_render],['__scopeId',"data-v-458f6c60"]])

/* harmony default export */ const ArticleCard = (__exports__);
// EXTERNAL MODULE: ./src/pages/index/components/browse/AuthorInfoCard.vue + 4 modules
var AuthorInfoCard = __webpack_require__(1677);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/components/browse/AuthorHotArticleCard.vue?vue&type=template&id=e8f4fa48&scoped=true


const AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_withScopeId = n => ((0,runtime_core_esm_bundler/* pushScopeId */.dD)("data-v-e8f4fa48"),n=n(),(0,runtime_core_esm_bundler/* popScopeId */.Cn)(),n)
const AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_hoisted_1 = { class: "author-hot-article-card-wrapper" }
const AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_hoisted_2 = /*#__PURE__*/ AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_withScopeId(() => /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("h2", { class: "title" }, "其他热门文章", -1 /* HOISTED */))
const AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_hoisted_3 = { class: "article-list" }
const AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_hoisted_4 = /*#__PURE__*/ AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_withScopeId(() => /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("i", { class: "iconfont icon-eye" }, null, -1 /* HOISTED */))

function AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
  return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("div", AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_hoisted_1, [
    AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_hoisted_2,
    (0,runtime_core_esm_bundler/* createElementVNode */._)("ul", AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_hoisted_3, [
      ((0,runtime_core_esm_bundler/* openBlock */.wg)(true), (0,runtime_core_esm_bundler/* createElementBlock */.iD)(runtime_core_esm_bundler/* Fragment */.HY, null, (0,runtime_core_esm_bundler/* renderList */.Ko)($props.articles, (item, idx) => {
        return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("li", { key: idx }, [
          (0,runtime_core_esm_bundler/* createElementVNode */._)("span", {
            onClick: _cache[0] || (_cache[0] = $event => ($options.gotoArticle(_ctx.article)))
          }, (0,shared_esm_bundler/* toDisplayString */.zw)(item.title), 1 /* TEXT */),
          AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_hoisted_4,
          (0,runtime_core_esm_bundler/* createElementVNode */._)("em", null, (0,shared_esm_bundler/* toDisplayString */.zw)(item.read_times), 1 /* TEXT */)
        ]))
      }), 128 /* KEYED_FRAGMENT */))
    ])
  ]))
}
;// CONCATENATED MODULE: ./src/pages/index/components/browse/AuthorHotArticleCard.vue?vue&type=template&id=e8f4fa48&scoped=true

;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/components/browse/AuthorHotArticleCard.vue?vue&type=script&lang=js

  /* harmony default export */ const AuthorHotArticleCardvue_type_script_lang_js = ({
    props: {
      articles: {
        type: Array,
        default: () => []
      },
    },
    methods: {
      gotoArticle(article) {
        this.$router.push({
          path: `/article/${article.article_id}`
        })
      }
    },
  });

;// CONCATENATED MODULE: ./src/pages/index/components/browse/AuthorHotArticleCard.vue?vue&type=script&lang=js
 
;// CONCATENATED MODULE: ./src/pages/index/components/browse/AuthorHotArticleCard.vue




;


const AuthorHotArticleCard_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(AuthorHotArticleCardvue_type_script_lang_js, [['render',AuthorHotArticleCardvue_type_template_id_e8f4fa48_scoped_true_render],['__scopeId',"data-v-e8f4fa48"]])

/* harmony default export */ const AuthorHotArticleCard = (AuthorHotArticleCard_exports_);
// EXTERNAL MODULE: ./src/pages/index/components/browse/CommentCard.vue + 9 modules
var CommentCard = __webpack_require__(4552);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/views/ArticleView.vue?vue&type=script&lang=js










  /* harmony default export */ const ArticleViewvue_type_script_lang_js = ({
    components: {
      AuthorInfoCard: AuthorInfoCard/* default */.Z,
      AuthorHotArticleCard: AuthorHotArticleCard,
      ArticleCard: ArticleCard,
      CommentCard: CommentCard/* default */.Z
    },
    data() {
      return {
        article_id: '',
        author: {},
        article: {},
        comments: [{}],
      }
    },
    computed: {
      ...(0,vuex_esm_bundler/* mapState */.rn)(['user']),
      userInfos() {
        return this.user.infos;
      }
    },
    watch: {
      $route: {
        handler(to) {
          console.log('article page route', this.$route);
          if(to.name === 'article') {
            this.fetchBaseInfo();
          }
        },
        immediate: true
      }
    },
    methods: {
      fetchBaseInfo() {
        this.article_id = parseInt(this.$route.params.article_id);
        this.fetchArticleInfo();
        this.fetchComments();
      },
      fetchAuthorInfo() {
        this.$post({
          name: 'author info',
          url: 'author/info',
          data: {
            author_id: this.article.author_id
          },
          callback: (res) => {
            if(res.data.success) {
              this.author = res.data.object;
              this.$fetch({
                name: 'author hot article',
                method: 'POST',
                url: 'author/article',
                data: {
                  page: 1,
                  author_id: this.article.author_id,
                  sort: 0,
                },
                callback: res => {
                  if(res.data.success) {
                    this.author.articles = res.data.object;
                  } else {
                    this.$alert({
                      type: 'error',
                      content: '获取作者文章失败'
                    })
                  }
                }
              })
            }
          }
        })
      },
      fetchArticleInfo() {
        this.$fetch({
          name: 'article info',
          url: 'article/content',
          method: 'POST',
          data: {
            article_id: this.article_id
          },
          callback: res => {
            if(res.data.success) {
              this.article = res.data.object;
              this.fetchAuthorInfo();
            }
          }
        })
      },
      fetchComments() {
        this.$fetch({
          name: 'comments',
          url: 'article/content/comment',
          method: 'POST',
          data: {
            article_id: this.article_id,
            page: 1
          },
          callback: res => {
            if(res.data.success) {
              this.comments = res.data.object;
            }
          }
        })
      },
      like() {
        (0,assert/* assertLogin */.s)(flag => {
          if(flag) {
            this.$post({
              name: 'like article',
              url: 'article/content/like',
              data: {
                article_id: this.article_id
              },
              callback: res => {
                if(res.data.success) {
                  this.fetchArticleInfo();
                  if(this.article.is_like) {
                    this.$alert("取消点赞");
                  } else {
                    this.$alert('点赞成功');
                  }
                } else {
                  if(this.article.is_like) {
                    this.$alert({
                      type: 'error',
                      content: "取消点赞失败"
                    });
                  } else {
                    this.$alert({
                      type: 'error', 
                      content: '点赞失败'
                    });
                  }
                }
              }
            })
          }
        })
        
      },
      comment(content) {
        (0,assert/* assertLogin */.s)(flag => {
          if(flag) {
            this.$post({
              name: 'comment',
              url: 'article/content/comment/submit',
              data: {
                user_id: this.userInfos.user_id,
                content,
                article_id: this.article_id
              },
              callback: res => {
                if(res.data.success) {
                  this.$alert('评论成功！');
                  this.fetchComments();
                } else {
                  this.$alert({
                    type: 'error',
                    content: '评论失败'
                  })
                }
              }
            })
          }
        })
      },
      collect() {
        (0,assert/* assertLogin */.s)(flag => {
          if(flag) {
            this.$post({
              name: 'collect article',
              url: 'article/content/collect',
              data: {
                article_id: this.article_id
              },
              callback: res => {
                if(res.data.success) {
                  if(this.article.is_collect) this.$alert('移除收藏成功');
                  else this.$alert('收藏成功');
                  this.fetchArticleInfo();
                } else {
                  if(this.article.is_collect) this.$alert({
                    type: 'error', 
                    content: '移除收藏失败'
                  })
                  else this.$alert({
                    type: 'error',
                    content: '收藏失败'
                  });
                }
              }
            })
          }
        })
      },
    },
    beforeRouteLeave() {
      this.$store.commit('renewHistoryArticleAbstracts');
    }
  });

;// CONCATENATED MODULE: ./src/pages/index/views/ArticleView.vue?vue&type=script&lang=js
 
;// CONCATENATED MODULE: ./src/pages/index/views/ArticleView.vue




;


const ArticleView_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(ArticleViewvue_type_script_lang_js, [['render',render],['__scopeId',"data-v-4378ca8e"]])

/* harmony default export */ const ArticleView = (ArticleView_exports_);

/***/ })

}]);